<?php 
ob_start();
session_start();
include "inc/conn.php";
$doup2s = "./inc/desc.txt";
$tts = date("YmdHis",time());
//设置好以下3-8个参数（双引号内内容）

$title="报名人数";			//设置查询标题,相信你懂的。
$copyr="名家居世博园";				//设置底部版权文字,相信你懂的。
$copyu="http://www.ffepcn.com/";			//设置底部版权连接,相信你懂的。

if(isset($_POST['id'])&&$_POST['id']==1){
    if (isset($_POST['pwd']) && $_POST['pwd'] == $password) {
        $_SESSION['pwd']=$password;
    } else {
        echo '<script>alert("密码错误")</script>';
    }

}
?>

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes" />
<title><?php echo $title;?></title>
<meta name="author" content="andy - vip@d163.net">
<meta name="copyright" content="www.d163.net">
<link href="https://lib.baomitu.com/twitter-bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="http://at.alicdn.com/t/font_374778_ufdzobu4bkh.css">
<link href="inc/css/wap.css?v=<?php echo $tts; ?>" rel="stylesheet" type="text/css" />
<style type="text/css">
	.myform input {margin-bottom: 10px; }
    header { background-color: #2196F3; color: #ffffff;position:fixed;top:0;left:0;width:100%; }
    header .back {position: absolute; left: 10px; top: 0px; }
    header .back .iconfont {color: #ffffff; font-size: 28px; }
    .hd-title {text-align: center; padding: 10px 0; } 
    .toggle-nav{z-index: 1000;}
    .main{padding-top: 80px;}
    .item-list {font-size: 14px; padding-top: 4px; }
    .item-list .item { padding: 3px 0px; display:flex;}
    .item-list .item:nth-of-type(2n) { background-color: #f5f5f5;}
    .item-list .item span {flex-basis: 18%;color: #414141; padding-left: 6px; }
    .item-list .item span.c_time {margin-left: auto; flex-grow: 1; text-align: right;color: #009688; }
    .item-list-thead {display: flex; font-size: 15px; background-color: #e2e2e2; font-weight: 700; padding: 4px 0; }
    .item-list-thead>span{flex-basis: 18%;color: #414141;padding-left: 6px; }
    .hidden{display: none;}
    .list-content .more-btn {font-size: 14px; text-align: center; margin-top: 10px; }
    .list-content .more-btn> a {display: block; padding: 8px 0px; background-color: #e8e8e8; }
    .list-content .more-btn>p {padding: 8px 0; background-color: #e8e8e8; }
    @media (min-width: 992px) {
        html{height: 100%;}
        body {height: 101%; }
    }
</style>
<body>
<?php include 'menu.php'; ?>
<header>
    <div class="hd-title">报名统计</div>
    <a class="back" href="javascript:;" onclick="history.go(-1)"><i class="iconfont icon-left-circle"></i></a>
</header>

<div class="main">
<?php 
if($_SESSION['pwd']!=$password){ ?>


<?php } ?>
<?php 

if(!file_exists($file_qd_all)){
webalert('请检查数据库文件');
}
if(isset($_SESSION['pwd']) && $_SESSION['pwd'] == $password){
$filer = fopen($file_qd_all, "r") or  webalert('无法打开文件!');
echo "<div class='myweb hidden'>\r\n";
while(!feof($filer)){
    $ii++;
    $rows=fgets($filer);
    $rows=trim($rows);
    if($rows){

            $tabvt=explode("\t",$lineone);
            $tabvs=explode("\t",$rows);
            $iae++; 
            $iaf=0; 
            echo "<div class='item item_ok'>\r\n";
            foreach($tabvs as $tabu){
                $iaf++; 
                $iag=$iaf-1;
                $a = trim($tabu);
       
                echo "<span >".$a."</span>\r\n";
            }
            echo "</div>\r\n";

    }
}
echo "</div>\r\n";
$total = $ii - 1;
echo '<div class="total">共有'.$total.'条数据</div>';
?>
<div class="list-content">
    <div class="item-list-thead">
        <span>姓名</span><span>手机</span>
    </div>
    <div class="item-list item-list-ok">数据加载中，请稍后...</div>
    <div class="more-btn more-ok"><a href="javascript:;" >加载更多</a></div>
</div>
<?php } else{ ?>
    <form id="myform" class="myform" name="form" method="post" action="">
        <input type="hidden" name="id" value="1">
        <input class="form-control" name="pwd" type="password" id="pwd" placeholder="请输入密码">
        <input class="btn btn-primary btn-block" type="submit" name="submit5" value="确定">
    </form>
<?php }

fclose($filer);

$etime=microtime(true);//获取程序执行结束的时间
$total=$etime-$stime;   //计算差值
echo "<!----页面执行时间：{$total} ]秒--->";
?>
    

</div>
<script src="http://lib.baomitu.com/jquery/2.1.4/jquery.min.js"></script>
<script src="inc/js/mobile-menu.js?v=<?php echo $tts;?>"></script>
<script src="inc/js/jquery.more.js?v=<?php echo $tts;?>"></script>
<script type="text/javascript">
$(function(){
    
    lanren.init(".item_ok", ".item-list-ok", ".myweb.hidden", _contentb,".more-ok");
    $('.more-ok').click(function(){
        lanren.loadMore(".item-list-ok .item",".item-list-ok",".more-ok",_contentb);
    });
    

});

</script>
</body>
</html>